package com.hy.bean.service.impl;

import com.hy.bean.dao.IUserDao;
import com.hy.bean.service.IUserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created With IntelliJ IDEA.
 * Descriptions:
 * User:Mr.Du
 * Date:2022/8/25
 * Time:18:25
 */
public class UserServiceImpl implements IUserService {

    @Override
    public void save() {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        IUserDao userDao = (IUserDao) applicationContext.getBean("userDao");
        userDao.save();
    }
}
